\hypertarget{geometry_8c}{}\doxysubsection{extern/libembroidery/src/geometry.c File Reference}
\label{geometry_8c}\index{extern/libembroidery/src/geometry.c@{extern/libembroidery/src/geometry.c}}
{\ttfamily \#include $<$stdio.\+h$>$}\newline
{\ttfamily \#include $<$stdlib.\+h$>$}\newline
{\ttfamily \#include $<$math.\+h$>$}\newline
{\ttfamily \#include \char`\"{}embroidery.\+h\char`\"{}}\newline
\doxysubsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{embroidery_8h_aca7cafe21cb651b77560fece69fb1984}{Emb\+Geometry}} $\ast$ \mbox{\hyperlink{geometry_8c_a85a825da7fbe0f04460724b80cc5844c}{emb\+Geometry\+\_\+init}} (int type\+\_\+in)
\begin{DoxyCompactList}\small\item\em Our generic object interface backends to each individual type. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{geometry_8c_a9946219466f0f6a7b5a506703bc34e9d}{emb\+Geometry\+\_\+free}} (\mbox{\hyperlink{embroidery_8h_aca7cafe21cb651b77560fece69fb1984}{Emb\+Geometry}} $\ast$obj)
\begin{DoxyCompactList}\small\item\em Free the memory occupied by a non-\/stitch geometry object. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{geometry_8c_a289ed9ab03a956588e081281ec112f4d}{emb\+Geometry\+\_\+move}} (\mbox{\hyperlink{embroidery_8h_aca7cafe21cb651b77560fece69fb1984}{Emb\+Geometry}} $\ast$obj, \mbox{\hyperlink{embroidery_8h_a16fa26764453571074cb85a7574738d4}{Emb\+Vector}} delta)
\begin{DoxyCompactList}\small\item\em Translate {\itshape obj} by the vector {\itshape delta}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{embroidery_8h_ac2f33b151fc40a0da3b14379aa0ec653}{Emb\+Rect}} \mbox{\hyperlink{geometry_8c_afe82721878628886585c5a6d8db7d55e}{emb\+Geometry\+\_\+bounding\+Rect}} (\mbox{\hyperlink{embroidery_8h_aca7cafe21cb651b77560fece69fb1984}{Emb\+Geometry}} $\ast$obj)
\begin{DoxyCompactList}\small\item\em Calculate the bounding box of geometry {\itshape obj} based on what kind of geometric object it is. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{geometry_8c_ae6461f57f08ce5992c70fa9897988644}{emb\+Geometry\+\_\+vulcanize}} (\mbox{\hyperlink{embroidery_8h_aca7cafe21cb651b77560fece69fb1984}{Emb\+Geometry}} $\ast$obj)
\begin{DoxyCompactList}\small\item\em Toggle the rubber mode of the object. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsubsection{Function Documentation}
\mbox{\Hypertarget{geometry_8c_afe82721878628886585c5a6d8db7d55e}\label{geometry_8c_afe82721878628886585c5a6d8db7d55e}} 
\index{geometry.c@{geometry.c}!embGeometry\_boundingRect@{embGeometry\_boundingRect}}
\index{embGeometry\_boundingRect@{embGeometry\_boundingRect}!geometry.c@{geometry.c}}
\doxyparagraph{\texorpdfstring{embGeometry\_boundingRect()}{embGeometry\_boundingRect()}}
{\footnotesize\ttfamily \mbox{\hyperlink{embroidery_8h_ac2f33b151fc40a0da3b14379aa0ec653}{Emb\+Rect}} emb\+Geometry\+\_\+bounding\+Rect (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{embroidery_8h_aca7cafe21cb651b77560fece69fb1984}{Emb\+Geometry}} $\ast$}]{obj }\end{DoxyParamCaption})}



Calculate the bounding box of geometry {\itshape obj} based on what kind of geometric object it is. 

{\itshape obj} A pointer to the geometry memory. \begin{DoxyReturn}{Returns}
Emb\+Rect The bounding box in the same scale as the input geometry.
\end{DoxyReturn}
In the case of a failure the bounding box returned is always the unit square with top left corner at (0, 0). \mbox{\Hypertarget{geometry_8c_a9946219466f0f6a7b5a506703bc34e9d}\label{geometry_8c_a9946219466f0f6a7b5a506703bc34e9d}} 
\index{geometry.c@{geometry.c}!embGeometry\_free@{embGeometry\_free}}
\index{embGeometry\_free@{embGeometry\_free}!geometry.c@{geometry.c}}
\doxyparagraph{\texorpdfstring{embGeometry\_free()}{embGeometry\_free()}}
{\footnotesize\ttfamily void emb\+Geometry\+\_\+free (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{embroidery_8h_aca7cafe21cb651b77560fece69fb1984}{Emb\+Geometry}} $\ast$}]{obj }\end{DoxyParamCaption})}



Free the memory occupied by a non-\/stitch geometry object. 

{\itshape obj} Pointer to geometry memory. \mbox{\Hypertarget{geometry_8c_a85a825da7fbe0f04460724b80cc5844c}\label{geometry_8c_a85a825da7fbe0f04460724b80cc5844c}} 
\index{geometry.c@{geometry.c}!embGeometry\_init@{embGeometry\_init}}
\index{embGeometry\_init@{embGeometry\_init}!geometry.c@{geometry.c}}
\doxyparagraph{\texorpdfstring{embGeometry\_init()}{embGeometry\_init()}}
{\footnotesize\ttfamily \mbox{\hyperlink{embroidery_8h_aca7cafe21cb651b77560fece69fb1984}{Emb\+Geometry}} $\ast$ emb\+Geometry\+\_\+init (\begin{DoxyParamCaption}\item[{int}]{type\+\_\+in }\end{DoxyParamCaption})}



Our generic object interface backends to each individual type. 

{\itshape type\+\_\+in} \begin{DoxyReturn}{Returns}
Emb\+Geometry$\ast$ 
\end{DoxyReturn}
\mbox{\Hypertarget{geometry_8c_a289ed9ab03a956588e081281ec112f4d}\label{geometry_8c_a289ed9ab03a956588e081281ec112f4d}} 
\index{geometry.c@{geometry.c}!embGeometry\_move@{embGeometry\_move}}
\index{embGeometry\_move@{embGeometry\_move}!geometry.c@{geometry.c}}
\doxyparagraph{\texorpdfstring{embGeometry\_move()}{embGeometry\_move()}}
{\footnotesize\ttfamily void emb\+Geometry\+\_\+move (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{embroidery_8h_aca7cafe21cb651b77560fece69fb1984}{Emb\+Geometry}} $\ast$}]{obj,  }\item[{\mbox{\hyperlink{embroidery_8h_a16fa26764453571074cb85a7574738d4}{Emb\+Vector}}}]{delta }\end{DoxyParamCaption})}



Translate {\itshape obj} by the vector {\itshape delta}. 

{\itshape obj} A pointer to the geometry memory. {\itshape delta} A vector in the 0.\+1mm scale to offset the geometry by. \mbox{\Hypertarget{geometry_8c_ae6461f57f08ce5992c70fa9897988644}\label{geometry_8c_ae6461f57f08ce5992c70fa9897988644}} 
\index{geometry.c@{geometry.c}!embGeometry\_vulcanize@{embGeometry\_vulcanize}}
\index{embGeometry\_vulcanize@{embGeometry\_vulcanize}!geometry.c@{geometry.c}}
\doxyparagraph{\texorpdfstring{embGeometry\_vulcanize()}{embGeometry\_vulcanize()}}
{\footnotesize\ttfamily void emb\+Geometry\+\_\+vulcanize (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{embroidery_8h_aca7cafe21cb651b77560fece69fb1984}{Emb\+Geometry}} $\ast$}]{obj }\end{DoxyParamCaption})}



Toggle the rubber mode of the object. 

{\itshape obj} 

\begin{DoxyRefDesc}{Todo}
\item[\mbox{\hyperlink{todo__todo000235}{Todo}}]Review. This could be controlled by a simple flag. \end{DoxyRefDesc}
